package com.epam.web_project.bank.command.show_commands;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.epam.web_project.bank.command.Command;
import com.epam.web_project.bank.entity.Account;
import com.epam.web_project.bank.util.AppPropertiesLoader;

public class ShowTransferCommand implements Command {

	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		HttpSession session = request.getSession();
		Account senderAccount = (Account) session.getAttribute("senderAcc");
		session.removeAttribute("senderAcc");
		request.setAttribute("senderAcc", senderAccount);
		AppPropertiesLoader props=AppPropertiesLoader.getInstance();
		return props.getProperty("transfer_page");
	}

}
